﻿<Window x:Class="ResourceBlender.Express.WinListBoxSelection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender.Express"
    loc:WindowService.EscapeClosesWindow="True"
    x:Name="root"
    Title="Title" WindowStartupLocation="CenterOwner"
    MinHeight="60" Height="110" MinWidth="100" Width="200" SizeToContent="Height" 
    Style="{StaticResource {x:Type Window}}" Icon="/ResourceBlenderExpress;component/Resources/images/resourceblender.ico">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Save" Executed="Save" CanExecute="CanExecuteSave"/>
        <CommandBinding Command="ApplicationCommands.Close" Executed="CloseWindow" />
    </Window.CommandBindings>
    <DockPanel Margin="6" LastChildFill="true">
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" MinHeight="10" HorizontalAlignment="Right">
            <Button x:Name="btnSave" Grid.Column="2" MinWidth="70" IsDefault="True" Command="ApplicationCommands.Save">Ok</Button>
            <Button x:Name="btnCancel" Grid.Column="3" MinWidth="70" IsCancel="True" Command="ApplicationCommands.Close" Margin="2,2,0,2">Cancel</Button>
        </StackPanel>
        
        <TextBlock x:Name="txtMessage" DockPanel.Dock="Top" TextAlignment="Left" TextWrapping="Wrap"/>
        <ListBox x:Name="lstItems" DockPanel.Dock="Top" ItemsSource="{Binding ElementName=root,Path=Items,Mode=OneWay,StringFormat=Resource #{0}}" SelectionMode="Single"
                 MouseDoubleClick="lstItems_MouseDoubleClick">
            
        </ListBox>
    </DockPanel>
</Window>
